﻿package com.toncen.samepms.system.domain;

import java.util.List;

import com.toncen.samepms.common.AbstractDomain;
import com.toncen.samepms.common.IPropertyUniqueble;
import com.toncen.samepms.common.ITreeable;
import com.toncen.samepms.common.Unique;
import com.sky.simple.engine.IWorkflowParticipator;

/**
 * 描述：角色表SYSTEM_ROLE的domain文件
 * 
 * @author fdf
 */
public class Role extends AbstractDomain implements ITreeable, IPropertyUniqueble, IWorkflowParticipator {
	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 1331533462549L;

	/**
	 * 名称
	 */
	@Unique(column = "NAME", title = "名称")
	private String name;

	/**
	 * 顺序
	 */
	private int sequence = 10;

	/**
	 * 可注册
	 */
	private int registerable = 2;

	/**
	 * @return the sequence
	 */
	public int getSequence() {
		return sequence;
	}

	/**
	 * @param sequence
	 *            the sequence to set
	 */
	public void setSequence(int sequence) {
		this.sequence = sequence;
	}

	public int getRegisterable() {
		return registerable;
	}

	public void setRegisterable(int registerable) {
		this.registerable = registerable;
	}

	public Role() {
		super();
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	public String getPrimaryName() {
		// TODO Auto-generated method stub
		return "ID";
	}

	public String getTableName() {
		// TODO Auto-generated method stub
		return "SYSTEM_ROLE";
	}

	public List<ITreeable> getTreeChild() throws Exception {
		return null;
	}

	public String getTreeId() throws Exception {
		return String.valueOf(this.getId());
	}

	public String getTreeText() throws Exception {
		return this.getName();
	}

}
